<template>
  <main-container class="main-box-bg-gray" :options="options" :isShowIframeHeader="false" :is-tab="isTab" />
</template>

<script>
  import MainContainer from '@/common/components/mainContainerMenu';

  export default {
    name: 'project',

    components: {
      MainContainer,
    },

    data() {
      return {
        options: [
          {
            path: '/trace/home',
            rightButtons: [
              // {
              //   name: '新建',
              //   type: 'primary',
              //   methodName: 'addFn',
              // },
            ],
            rightTopNum: null,
          },
          {
            path: '/trace/traceWork',
            rightButtons: [
              {
                name: '新建',
                type: 'primary',
                methodName: 'addFn',
              },
            ],
            rightTopNum: null,
          },
          {
            path: '/trace/event',
            rightButtons: [
              {
                name: '新建',
                type: 'primary',
                methodName: 'addFn',
              },
            ],
            rightTopNum: null,
          },
          {
            path: '/trace/summary',
            rightButtons: [
              {
                name: '新建',
                type: 'primary',
                methodName: 'addFn',
              },
            ],
          },
          {
            path: '/trace/haveDone',
            rightButtons: [
              {
                name: '新建',
                type: 'primary',
                methodName: 'addFn',
              },
            ],
          },
          {
            path: '/trace/workDone',
            rightButtons: [
              {
                name: '新建',
                type: 'primary',
                methodName: 'addFn',
              },
            ],
          },
          {
            path: '/trace/statistics',
            rightButtons: [
              {
                name: '新建',
                type: 'primary',
                methodName: 'addFn',
              },
            ],
          },
          {
            path: '/trace/mycontract',
            rightButtons: [
              {
                name: '新建',
                type: 'primary',
                methodName: 'addFn',
              },
            ],
          }
        ],
        isTab: true,
      };
    },
    created() {
      this.isTab = this.$route.meta.isTab ? true : false;
    },
    mounted() {},
    watch: {
      '$store.state.todoNum': {
        handler(value) {
          this.options[0].rightTopNum = value;
        },
        immediate: true,
        deep: true,
      },
      '$store.state.workNum': {
        handler(value) {
          this.options[1].rightTopNum = value;
        },
        immediate: true,
        deep: true,
      },
      '$store.state.eventNum': {
        handler(value) {
          this.options[2].rightTopNum = value;
        },
        immediate: true,
        deep: true,
      },
    },
    methods: {
      
    },
  };
</script>
